﻿<html>
<head>
    <script type="text/javascript">
        function ShowLocation(oWidth, oHeight, color) {
            var mDiv = document.getElementById('locationDiv');
            mDiv.style.display = 'block';
            mDiv.style.top = 200;
            mDiv.style.left = 200;
            mDiv.style.borderWidth = 1 + 'px';
            mDiv.style.borderColor = color;
            mDiv.style.borderStyle = 'solid';
            mDiv.style.width = oWidth + 'px';
            mDiv.style.height = oHeight + 'px';
        }
        function HideLocation() {
            var mDiv = document.getElementById('locationDiv');
            mDiv.style.display = 'none';
        }
    </script>
</head>
<body>
<div id="myDiv">
        This is a simple HTML- page.
        <br>
        <br>
        <input type="button" name="Button2" value="弹出DIV" onclick="ShowLocation(400,400,'#8db4e2');">
    </div>
    <div id="locationDiv" style="display: none; position: absolute; background-color: White">
        <div style="text-align: center;">
            <input type="button" value="点击关闭" id="closePic" onclick="HideLocation()" />
        </div>
    </div>
    
</body>
</html>
